﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Abs_classes_data;

namespace Conc_classes_data
{
    public class reservoire : abs_controlled_object
    {
        public reservoire(Double start_volume)
        {
            if (start_volume < _total_volume)
                _current_volume = start_volume;
        }

        private Double _total_volume = 1000;
        public Double Total_Volume
        {
            get { return _total_volume; }
        }

        private Double _current_volume;

        public Double Current_volume
        {
            get { return _current_volume; }
            set { _current_volume = value; }
        }

        public void Get_Gas(Double volume)
        {
            _current_volume -= volume;
        }

        public override Double Get_Data()
        {
            return _current_volume;
        }
    }
}
